#include "sdlapp.h"
#include "test.h"
#include "sdltimer.h"
#include <sstream>
#include "sdlsound.h"

class Game : public SDLApp
{
public:
	Game(string gameName);
	~Game();
	
	//overriding function from SDLApp
	void drawScene();
	void updateScene();
	
	bool init();
	
private:
	TestLevel LevelOne;
	
};


int main()
{
	// Name our Game
	string myGameName;
	myGameName = "Sample Game";
	// create the game and run it!
	Game MyGame(myGameName);
	
	// if we change MyGame, we only have to change it here!
	gSDLApp = &MyGame;
	
	gSDLApp->run();

	return 0;
}
	
Game::Game(string gameName)
{
	
	// set the window caption bar
	SDL_WM_SetCaption(gameName.c_str(), NULL);
	
	// Init Font system
	TTF_Init();
	
	if(LevelOne.initLevel() == false)
	{
		std::cout << "level failed to initialize" << std::endl;
	}
	

}
Game::~Game()
{
	
}
void Game::updateScene()
{
	//nothing to update... yet
	//SDL_Delay(3000);
	
	
	LevelOne.update();
	

}
void Game::drawScene()
{
	displayFPS();
	//update screen
	SDL_Flip(gSDLApp->getScreen());
		
}

